document.getElementsByClassName('nav-link')[0].addEventListener("click", (e) => {
    document.querySelectorAll(".menu-links li a").forEach((item) => {
        item.style.background = "transparent";
    });
    let target = e.target;
    while (target.tagName != 'LI') {
        target = target.parentElement;
    }
    target.getElementsByTagName('a')[0].style.background = "skyblue";
    var image = document.getElementsByClassName("submit");
    if (image.length) {
        for (var i = image.length - 1; i >= 0; i--) {
            image[i].parentElement.style.border = "2px dashed"
            image[i].parentElement.getElementsByClassName("close").length && image[i].parentElement.getElementsByClassName("close")[0].remove();
            image[i].remove();
        }
    }
})
